package com.fluxtool.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.fluxtool.entity.Ips;
import com.fluxtool.mapper.IpsMapper;
import com.fluxtool.service.IpsService;

@Service
public class IpsServiceImpl extends ServiceImpl<IpsMapper, Ips> implements IpsService{

	@Autowired
	private IpsMapper ipsMapper;
	
	@Override
	public List<Ips> selectAllWhereEnble() {
		EntityWrapper<Ips> entityWrapper = new EntityWrapper<Ips>();
		entityWrapper.where("enble = {0}", 1);
		return ipsMapper.selectList(entityWrapper);
	}

	@Override
	public boolean deleteALL() {
		EntityWrapper<Ips> entityWrapper = new EntityWrapper<Ips>();
		entityWrapper.where("id != {0}", 0);
		ipsMapper.delete(entityWrapper);
		return false;
	}

}
